﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace MyGame
{
    public abstract class VisibleGameEntity : GameEntity
    {
        protected List<My2DSprite> sprites;
        protected int nSprites;
        protected Vector2 _TopLeft;

        public Vector2 TopLeft
        {
            get { return _TopLeft; }
            set { _TopLeft = value; }
        }
        protected Vector2 _Size;

        public Vector2 Size
        {
            get { return _Size; }
            set { _Size = value; }
        }


        virtual public void Update(GameTime gameTime)
        {
            for (int i = 0; i < nSprites; i++)
            {
                sprites[i].Update(gameTime);
            }
        }

        virtual public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            for (int i = 0; i < nSprites; i++)
            {
                sprites[i].Draw(gameTime, spriteBatch);
            }
        }
    }
}
